<template>
  <div class="layout1-header">
    <div class="layout1-logo">
        落地化管理平台
    </div>
    <div class="layout1-breadcrumb">
      <div >
        <el-icon @click="chengeMenuCollapse">
          <Fold  v-if="!collapse" />
          <Expand  v-if="collapse" />
        </el-icon>
      </div>
      <div>
        <Breadcrumb></Breadcrumb>
      </div>
    </div>
    <div class="layout1-user">
      <Search></Search>
      <DarkMode></DarkMode>
      <Message></Message>
      <UserAvatar></UserAvatar>
    </div>
  </div>
</template>

<script setup lang="ts">
import {
  Fold,
  Expand
} from '@element-plus/icons-vue'

import { useGlobalStore } from '@/stores/useGlobalStore.ts'
import { computed } from 'vue';
import Breadcrumb from '../components/breadcrumb.vue';
import Search from '../components/search.vue';
import DarkMode from '../components/darkMode.vue';
import Message from '../components/message.vue';
import UserAvatar from '../components/userAvatar.vue';

const globalStore = useGlobalStore();
const collapse = computed(() => globalStore.isCollapse);

const chengeMenuCollapse = ()=>{
  globalStore.setCollapse(!collapse.value);

}

</script>
<style scoped lang="scss">
:deep(.bell-num .el-badge__content.is-fixed){
  top:12px ;
}
.layout1-header{
  line-height:  50px;
  height: 50px;
  display: flex;
    .layout1-logo{
      width: 150px;
      height: 50px;
    }
    .layout1-breadcrumb{
      height: 50px;
      display: flex;
      flex: 1;
      div{
        padding: 0 10px;
      }
      .el-breadcrumb{
        line-height:  50px;
      }
    }
    .layout1-user{
      display: flex;
      padding: 0 10px ;
      width: 270px;
      align-items: center;
      justify-content: space-evenly;
    }
  }
</style>